<!DOCTYPE html>
<html>
<head>
    <title>会员、主播</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div class="row">
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>累计充值</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins">{{cz_amount}}</h1>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>消费总额</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins">{{xf_amount}}</h1>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>下单量</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins">{{orderCount}}</h1>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>邀请量</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins">{{yaoqingCount}}</h1>
                </div>
            </div>
        </div>
    </div>
    <i-form ref="formValidate" :model="apiUser" :rules="ruleValidate" :label-width="100">

        <Row>
            <i-col span="12">

                <Form-item label="昵称" prop="nickname">
                    <i-input v-model="apiUser.nickname" placeholder="昵称"/>
                </Form-item>
                <Form-item label="手机" prop="phone">
                    <i-input v-model="phone" placeholder="手机"/>
                </Form-item>

                <Form-item label="城市" prop="cityName">
                    <i-input v-model="apiUser.cityName" placeholder="所在城市名称"/>
                </Form-item>
                <Form-item label="性别" prop="gender">
                    <Radio-group v-model="apiUser.gender">
                        <Radio label="1">
                            <span>男</span>
                        </Radio>
                        <Radio label="2">
                            <span>女</span>
                        </Radio>
                    </Radio-group>
                </Form-item>

                <Form-item label="状态" prop="status">
                    <Radio-group v-model="apiUser.status">
                        <Radio label="1">
                            <span>有效</span>
                        </Radio>
                        <Radio label="2">
                            <span>禁用</span>
                        </Radio>
                    </Radio-group>
                </Form-item>
            </i-col>
            <i-col span="12">
                <Form-item label="可提现金额" prop="availableAmount">
                    <i-input v-model="apiUser.availableAmount" placeholder="可提现金额" disabled/>
                </Form-item>
                <Form-item label="累计总金额" prop="withdrawAmount">
                    <i-input v-model="apiUser.withdrawAmount" placeholder="累计收益金额" disabled/>
                </Form-item>

                <Form-item label="年龄" prop="age">
                    <i-input v-model="apiUser.age" placeholder="联建" disabled/>
                </Form-item>
                <Form-item label="出生日期" prop="birthday">
                    <Date-picker v-model="apiUser.birthday" placeholder="出生日期" disabled></Date-picker>
                </Form-item>
                <Form-item label="注册时间" prop="registerTime">
                    <Date-picker v-model="apiUser.registerTime" placeholder="注册时间" disabled></Date-picker>
                </Form-item>
                <Form-item label="近次登录" prop="lastLoginTime">
                    <Date-picker v-model="apiUser.lastLoginTime" placeholder="最后一次登录时间" disabled></Date-picker>
                </Form-item>


            </i-col>
        </Row>
    </i-form>
</div>

<script type="text/javascript">
    let id = getQueryString("userId");
    let vm = new Vue({
        el: '#rrapp',
        data: {
            cz_amount: 0,
            xf_amount: 0,
            phone: '',
            yaoqingCount: 0,
            orderCount: 0,
            apiUser: {},
            ruleValidate: {
                name: [
                    {required: true, message: '名称不能为空', trigger: 'blur'}
                ]
            },
            q: {
                name: ''
            }
        },
        created: function () {
            $.get("../user/info/" + id, function (r) {
                vm.apiUser = r.apiUser;
                vm.cz_amount = r.cz_amount;
                vm.xf_amount = r.xf_amount;
                vm.yaoqingCount = r.yaoqingCount;
                vm.orderCount = r.orderCount;
                vm.phone = r.phone;
            });
        }
    });

</script>
</body>
</html>